package com.swinginwind.flexutils.components
{
	import flash.display.DisplayObject;
	import flash.text.TextField;
	
	import mx.controls.CheckBox;

	/**
	 * @author jimmy
	 * @E-mail: swinginwind@gmail.com
	 * @version 1.0.0
	 * 创建时间：2013-5-13 上午10:51:51
	 * 
	 */
	public class CenterCheckBox extends CheckBox
	{
		public function CenterCheckBox()
		{
			super();
			this.setStyle("textAlign", "center");
		}
		
		/*override protected function updateDisplayList(width:Number, height:Number):void
		{
			super.updateDisplayList(width,height);
			var n:int = numChildren;
			for( var i:int = 0;i<n;i++)
			{
				var c:DisplayObject = getChildAt(i);
				if(!(c is TextField))
				{
					c.x = Math.round((width - c.width) / 2);
					c.y = Math.round((height - c.height) / 2);
				}
			}
		}*/
	}
}